package org.esti.model.dao;

import org.esti.model.Interview;
import org.esti.model.InterviewResult;

import java.util.List;

/**
 * @author Artem Loginov (logart)
 */

/**
 * DAO is used to getKnowledgeFieldById, save and update objects information in database.
 * This dao manage user interviews.
 */
public interface InterviewDAO {
    /**
     * return all user interview
     *
     * @param userId identity of user. Interview passed by this user will be returned
     * @return list of interview passed by specific user
     */
    List<Interview> getUserInterviews(long userId);

    /**
     * return interview by id
     *
     * @param interviewId identity of interview which will be returned
     * @return interview with specific id
     */
    Interview get(long interviewId);

    /**
     * get specific result by their id
     * @param interviewResultId which will be returned
     * @return interview result
     */
    InterviewResult getInterviewResult(long interviewResultId);

    /**
     * return list of all interview
     * @return list of interview
     */
    List<Interview> getAllInterview();

    /**
     * creates new interview using parameter
     * @param interview which will be stored to DB
     * @return persisted interview instance
     */
    Interview create(Interview interview);


}
